{$CLEO .cs}  //Modifled in 1/2/2025

//-------> ( No Any More For This Guy ---> author hot coffee En This is his Channel ( https://www.youtube.com/@author_hot_coffeeEn/videos )

//-------> ( This Script Convert From Mobile Version to PC By ( SHoCK_ FLaMe \ @SHoCK_FLaMe )

//-------> ( My Channel on YouTube ---> https://www.youtube.com/channel/UCIslsB-GX9gFas2_TXP5yJA

0000:( $-----Police Helicopter Maverick-----$ )

 

:CREATE_M4_19
wait 126 
if 
0256:   player $PLAYER_CHAR defined 
jf @CREATE_M4_19 
if 
00DD:   actor $PLAYER_ACTOR driving_car_with_model #POLMAV 
jf @CREATE_M4_87
jf @CREATE_M4_269 
03C0: 0@ = actor $PLAYER_ACTOR car
00E1:   player 0 pressed_key 14 
jf @STOP_SHOOTING // Jump to stop shooting if key is not pressed
12@ = -1
 
0208: 1@ = random_float_in_ranges -3.3 3.3 
0208: 2@ = random_float_in_ranges -3.3 3.3
0208: 3@ = random_float_in_ranges -3.3 3.3 
0407: store_coords_to 3@ 5@ 6@ from_car 0@ with_offset 1@ 3@ 2@
0407: store_coords_to 7@ 8@ 9@ from_car 0@ with_offset 0.0 3.75 -0.7   
//----> Auto-Aim Actors or Ped <----
08E5: get_actor_in_sphere 7@ 8@ 9@ radius 100.0 handle_as 12@
if 
056D:   actor 12@ defined // Check if the actor is valid
then
    04C4: store_coords_to 3@ 5@ 6@ from_actor 12@ with_offset 1@ 0.0 0.0 0.0 2@
    06BC: create_M4_shoot_from 7@ 8@ 9@ target 3@ 5@ 6@ energy 20
    09F7: play_audio_at_car 0@ event 1157 
    064C: make_particle 10@ visible 
    064F: remove_references_to_particle 10@ 
//else
    jump @STOP_SHOOTING // Jump to stop shooting if no valid actor is found
end

jump @CREATE_M4_87

:STOP_SHOOTING
// Logic to stop shooting
if 
056D:   actor 12@ defined // Ensure the actor is valid before removing references
then
    01C2: remove_references_to_actor 12@
end
09F7: play_audio_at_car 0@ event 1158 // Optional: Play a "stop shooting" sound
064F: remove_references_to_particle 10@ // Remove particle effects
jump @CREATE_M4_87

:CREATE_M4_87
wait 0
if
00DF:   actor $PLAYER_ACTOR driving 
jf @CREATE_M4_269

:CREATE_M4_269
if 
//056E:   car 0@ defined 
//jf @CREATE_M4_19 
wait 0
if
056E:   car 0@ defined // Ensure the car is valid before removing references
then
    01C3: remove_references_to_car 0@ 
end
jump @CREATE_M4_19 

0A93: terminate_this_custom_script
